home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / SDKs / Apple Game Sprockets / InputSprocket / Sample⁄Test Applications / InputSprocketPPTest / ISpTestMain.h < prev   
Encoding:
C/C++ Source or Header  |  1998-07-17  |  2.1 KB  |  84 lines  |  [TEXT/CWIE]

  1. /*************************************************************************************
  2.  
  3. File:      ISpTestMain.h
  4.  
  5. Copyright © 1996, 1997, 1998 Apple Computer, Inc., All Rights Reserved
  6.  
  7.  
  8. You may incorporate this sample code into your applications without
  9. restriction, though the sample code has been provided "AS IS" and the
  10. responsibility for its operation is 100% yours.  However, what you are
  11. not permitted to do is to redistribute the source as "DSC Sample Code"
  12. after having made changes. If you're going to re-distribute the source,
  13. we require that you make it clear in the source that the code was
  14. descended from Apple Sample Code, but that you've made changes.
  15.  
  16. *************************************************************************************/
  17.  
  18.  
  19. #pragma once
  20.  
  21. #include <LApplication.h>
  22. #include <InputSprocket.h>
  23.  
  24. class    CPPStarterApp : public LApplication {
  25. public:
  26.                         CPPStarterApp();        // constructor registers all PPobs
  27.     virtual             ~CPPStarterApp();        // stub destructor
  28.     
  29.         // this overriding function performs application functions
  30.         
  31.     virtual Boolean        ObeyCommand(CommandT inCommand, void* ioParam);    
  32.     
  33.         // this overriding function returns the status of menu items
  34.         
  35.     virtual void        FindCommandStatus(CommandT inCommand,
  36.                             Boolean &outEnabled, Boolean &outUsesMark,
  37.                             Char16 &outMark, Str255 outName);
  38.                             
  39.     virtual void            EventResume        (const EventRecord &inMacEvent);
  40.     virtual void            EventSuspend    (const EventRecord &inMacEvent);
  41.     
  42.     enum
  43.     {
  44.         cmd_Suspend = 1000,
  45.         cmd_Resume = 1001,
  46.         cmd_NextElement = 1002,
  47.         cmd_PrevElement = 1003,
  48.         cmd_AddElement = 1004,
  49.         cmd_DeleteElement = 1005,
  50.         cmd_UIStart = 1006,
  51.         cmd_UIConfigure = 1007,
  52.         cmd_UIStop = 1008,
  53.         cmd_ActivateKeyboard = 1009,
  54.         cmd_ActiveMouse = 1010,
  55.         cmd_DeactiveBoth = 1011
  56.     };
  57.     
  58.     enum
  59.     {
  60.         kIconSuiteID_XThrust = 128, 
  61.         kIconSuiteID_YThrust,
  62.         kIconSuiteID_ZThrust,
  63.         kIconSuiteID_Look,
  64.         kIconSuiteID_Fire,
  65.         kIconSuiteID_Thrust,
  66.         kIconSuiteID_Pause,
  67.         kIconSuiteID_Start
  68.     };
  69.  
  70.     
  71.     enum
  72.     {
  73.         kNumNeeds = 7
  74.     };
  75.     
  76.     ISpNeed mNeeds[kNumNeeds];
  77.     ISpElementReference mVirtualElements[kNumNeeds];
  78.     
  79.     void InitNeeds(void);
  80.     
  81. protected:
  82.  
  83.     virtual void        StartUp();        // overriding startup functions
  84. };